Xbasic
INDEX.FIND_PREVIOUS Function
Syntax
P Find_Previous(P key)
Arguments
- key
A pointer to an existing index entry.
Description
Find the key Before the specified key, true TRUE if exact match, else returns key found.
Discussion
The .FIND_PREVIOUS() method finds the key before the specified key. The method returns .T. (TRUE) if is an exact match; otherwise, it returns the key found.
Example
dim t as P
dim i as P
dim b as P
dim b.key as C
t = table.open("customer")
i = t.index_primary_put("Lastname")
b = i.find_last()
? b
= Key = "Wong "
Record = 28.000000
x = i.find_previous(b)
? x
= Key = "Winka "
Record = 11.000000See Also